﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MahApps.Metro.Controls;

namespace WPF.CustomControl
{
    /// <summary>
    /// Interaction logic for ProgressRingCtrl.xaml
    /// </summary>
    public partial class ProgressRingBar : UserControl
    {
        public ProgressRingBar()
        {
            InitializeComponent();
            SizeChanged += new SizeChangedEventHandler(ProgressRingBar_SizeChanged);
            Visibility = System.Windows.Visibility.Collapsed;
        }

        void ProgressRingBar_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            layProgress.Width = this.ActualWidth / 5;
            layProgress.Height = this.ActualHeight / 5;
        }

        public string MessageBanner { get { return tb_Text.Text; } set { tb_Text.Text = value; } }
        internal void Start()
        {
            Visibility = System.Windows.Visibility.Visible;
        }

        internal void Stop()
        {
            Visibility = System.Windows.Visibility.Collapsed;
        }
    }
}
